import { Component } from 'react';
import { Modal, Button } from 'antd';
import './floatBall.less';
import { Link } from 'react-router-dom';


class FloatBallModal extends Component {
    state = {
        visible: false
    };

    showModal = () => {
        this.setState({
            visible: true,
        });
    };

    handleCancel = () => {
        this.setState({
            visible: false,
        });
    };

    render() {
        return (
            <Modal
                title={null}
                open={this.state.visible}
                onCancel={this.handleCancel}
                footer={null}
                destroyOnClose={true}
            >
                <div className='form-util-main'>
                    <div className='form-util-title'>
                        <h2>JmsBlog工具箱</h2>
                        <span>旨在为用户提供最便捷的体验</span>
                    </div>
                    <div className='form-util-content'>
                        <Button type='primary'>
                            <Link to={'/'}>首页</Link>
                        </Button>
                        <Button type='primary'>
                            <Link to={'/jms/crawl'}>爬虫</Link>
                        </Button>
                    </div>
                </div>
            </Modal>
        );
    }
}

export default FloatBallModal;